package com.qf.service;

import com.qf.entity.User;

public class UserDetailsService {

    public User loadByUsername(String name){
        //根据用户名去数据库中查询用户对象
        //这里我们模拟查询到了对象
        //查询用户信息的同时，应该将用户的权限一并查询出来
        if ("zhangsan".equals(name)){
            User user = new User(name,"123","P1");

            return user;
        }

        //根据用户名没有查询到用户
        return null;
    }
}
